<h2>Mon historique</h2>

<table>
  <thead>
    <tr>
      <th>Produit</th>
      <th>Statut</th>
      <th>Ajouté le</th>
      <th>Acheté le</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($shop_historics as $shop_historic): ?>
    <tr>
      <td><?php echo $shop_historic->getShopProduct()->getTitle() ?></td>
      <td><?php if($shop_historic->getStatut()== 1) { echo "ajouté"; }; if($shop_historic->getStatut()== 2) { echo "acheté"; } ?></td>
      <td><?php echo $shop_historic-> getDateTimeObject('created_at')->format('d/m/Y') ?></td>
      <td><?php if($shop_historic->getStatut()== 2) { echo $shop_historic-> getDateTimeObject('updated_at')->format('d/m/Y'); } else { echo "en attente"; } ?></td>  
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  
